package com.yupi.mianshiya.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yupi.mianshiya.model.entity.Favorite;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.mianshiya.model.vo.FavoriteVO;


public interface FavoriteService extends IService<Favorite> {

    /**
     * 判断是否已经收藏
     * @param userId
     * @param favorite
     * @return
     */
    boolean isFavorited(Long userId, Favorite favorite);

    /**
     * 收藏或取消收藏

     */
    boolean toggleFavorite(Long userId, Favorite favorite);

    /**
     * 获取收藏列表
     *
     * @param userId
     * @param pageSize
     * @param current
     * @param contentType
     * @return
     */
    Page<FavoriteVO> getFavoriteList(Long userId, int pageSize, int current, String contentType);
}
